package com.job.ali;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @ClassName: test.Ali1
 * @Description:
 * @Author: 12071
 * @Date: 2022/4/15 19:14
 */
public class Ali1 {
    public static void main(String[] args) {
        int[][] cases = new int[10][2];
        for (int i = 2; i < 10; i++) {
            if(i==7 || i==9) cases[i][0] = 4;
            else cases[i][0]=3;
            if(i==2) cases[i][1]='A';
            else cases[i][1] = cases[i-1][1]+cases[i-1][0];
        }
//        for (int[] item : cases) {
//            System.out.println(Arrays.toString(item));
//        }
        Scanner sc = new Scanner(System.in);
        char[] input = sc.nextLine().toCharArray();
        char lastChar = '0';
        StringBuffer sb = new StringBuffer();
        int times = 1;
        for (int i = 0; i < input.length; i++) {
            char ch = input[i];
//            System.out.println(ch +" "+times);
            if(ch == lastChar){
                times++;
            }else{
                if(lastChar>'1'){
                    sb.append((char) (cases[lastChar-'0'][1]+(times-1)%cases[lastChar-'0'][0]));
                }
                times=1;
            }
            lastChar = ch;
        }
        System.out.println(sb.toString());
    }
}
